﻿using DZParallelLib.Utility;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;

namespace DZParallelLib.Test.Utility
{
    [TestClass]
    public class DZIOTest
    {
        [TestMethod]
        [ExpectedException(typeof(FileNotFoundException))]
        public void TestOnBadFile()
        {
            DZIO.LoadDZ(new FileInfo("fork.xml"));
        }

        [TestMethod]
        [DeploymentItem("DZImage1", "DZImage3")]
        public void TestLoading1ImageFile()
        {
            var r = DZIO.LoadDZ(new FileInfo(@"DZImage3\dz.xml"));
            Assert.IsNotNull(r);
            Assert.AreEqual(1, r.Items.Length, "images");
        }
    }
}
